{include file="index/head" /}
<div class="box">
  <form method="post" action="{:url('add')}" class="sycmsform">
    <div class="box-head">
      <h2>{$v.id?'编辑':'添加'}模板</h2>
      <div class="fr">
        <button type="submit" class="btn"><i class="icon-check"></i>{$v.id?'编辑':'添加'}</button>
        &nbsp;<a href="javascript:history.go(-1);" class="btn fr"><i class="icon-mail-reply (alias)"></i>返回</a></div>
    </div>
    <div class="form">
      <input type="hidden" name="id" value="{$v.id}" />
      <ul>       
        <li>
          <label>模板名称：</label>
          <div class="item">
            <input type="text" name="title" value="{$v.title}" class="input" datatype="*" nullmsg="请输入模板名称"/>
          </div>
        </li>
        <li>
          <label>模板目录：</label>
          <div class="item">
            <input type="text" name="entitle" value="{$v.entitle}" class="input" datatype="*"  nullmsg="请输入模板目录名" />
						<span class="tips">英文名称</span>
          </div>
        </li>       
        <li>
          <label>模板封面：</label>
          <div class="item">
            <input type="text" name="img" value="{$v.img}" class="input" datatype="*" nullmsg="请上传模板封面图片" />
            <button type="button" class="button fl" onclick="sycms.showupload(this)" id="image1" at="dg"><i class="icon-plus"></i>浏览上传</button>
            <div class="clear"></div>
            <div class="input-image">{if $v.img}<img src="{$v.img}" alt="" />{/if}</div>
          </div>
        </li>  
				<li>
				  <label>是否显示：</label>
				  <div class="item radio">
				    <span><input type="radio" value="1" {if condition="$v.type eq 1 || $v.type eq ''"}checked{/if} name="type"> 电脑模板</span>
						<span><input type="radio" value="2" {if condition="$v.type eq 2"}checked{/if} name="type"> 手机模板</span>
				  </div>
				</li>
        <li>
          <label>&nbsp;</label>
          <div class="item">
            <button type="submit" class="button"><i class="icon-check"></i>{$v.id?'编辑':'添加'}</button>
          </div>
        </li>
      </ul>
    </div>
  </form>
</div>
<script> sycms.submitform("{:url('index')}"); </script>